<template>
  <div>
    <ul>
      <li v-for="item in datalist" :key="item.id">
        {{item.name}}
      </li>
    </ul>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  
  computed:{
    ...mapState(['datalist']),
    num(){

    }
  }
  // computed:mapState({
  //   list:(state)=>state.datalist
  // })
}
</script>

